home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
wais
/
waisgate
/
HTFile.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-09
|
3KB
|
161 lines
/* File access in libwww
FILE ACCESS
These are routines for file access used by WWW browsers.
*/
#ifndef HTFILE_H
#define HTFILE_H
#include "HTFormat.h"
#include "HTAccess.h"
#include "HTML.h" /* SCW */
/*
Controlling globals
These flags control how directories and files are represented as hypertext, and are
typically set by the application from command line options, etc.
*/
extern int HTDirAccess; /* Directory access level */
#define HT_DIR_FORBID 0 /* Altogether forbidden */
#define HT_DIR_SELECTIVE 1 /* If HT_DIR_ENABLE_FILE exists */
#define HT_DIR_OK 2 /* Any accesible directory */
#define HT_DIR_ENABLE_FILE ".www_browsable" /* If exists, can browse */
extern int HTDirReadme; /* Include readme files in listing? */
/* Values: */
#define HT_DIR_README_NONE 0 /* No */
#define HT_DIR_README_TOP 1 /* Yes, first */
#define HT_DIR_README_BOTTOM 2 /* Yes, at the end */
#define HT_DIR_README_FILE "README"
/*
Convert filenames between local and WWW formats
*/
extern char * HTLocalName PARAMS((CONST char * name));
/*
Make a WWW name from a full local path name
*/
extern char * WWW_nameOfFile PARAMS((const char * name));
/*
Generate the name of a cache file
*/
extern char * HTCacheFileName PARAMS((CONST char * name));
/*
Define the representation for a file suffix
*/
/* On entry,
** suffix includes the "." if that is important (normally, yes!)
** representation is MIME-style
** quality an a priori judgement of the quality of such files
**
** Example: HTSetSuffix(".ps", "application/postscript", 1.0);
**
*/
extern void HTSetSuffix PARAMS((
CONST char * suffix,
CONST char * representation,
float quality));
/*
Determine file format from file name
*/
extern HTFormat HTFileFormat PARAMS((
CONST char * filename));
/*
Determine file format from file name
*/
extern float HTFileValue PARAMS((
CONST char * filename));
/*
Determine write access to a file
ON EXIT,
return value YES if file can be accessed and can be written to.
*/
/*
BUGS
Isn't there a quicker way?
*/
extern BOOL HTEditable PARAMS((CONST char * filename));
/*
Determine a suitable suffix, given the representation
ON ENTRY,
rep is the atomized MIME style representation
ON EXIT,
returns a pointer to a suitable suffix string if one has been found,
else NULL.
*/
extern CONST char * HTFileSuffix PARAMS((
HTAtom* rep));
/*
The Protocols
*/
extern HTProtocol HTFTP, HTFile;
#endif /* HTFILE_H */
/*
end of HTFile */